// userinfo
import * as Acts from './consts';

const UserModule = {
	state: {
		id: null,
		mobile: ''
	},
	mutations: {
		[Acts.SET_USER_INFO](state, infos) {
			for (let key in infos) {
				state[key] = infos[key]
			};
		}
	},
	actions: {
		[Acts.SET_USER_INFO](store, info) {
			store.commit(Acts.SET_USER_INFO, info);
		}
	}
}

export default UserModule